-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add segmentStyle prop to SegmentedControl #2563
Conversation
@@ -164,6 +169,7 @@ const SegmentedControl = (props: SegmentedControlProps) => { | |||
selectedIndex={animatedSelectedIndex} | |||
activeColor={activeColor} | |||
inactiveColor={inactiveColor} | |||
segmentStyle={segmentStyle} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's an individual style for each segment, why it's not passed in the segment, meaning part of the SegmentedControlItemProps
and not the SegmentedControlProps
? It's confusing, or maybe it's just the naming...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it is confusing because I actually wanted one style prop for all of them. 😅
Maybe segmentsStyle
in plural?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I guess segmentsStyle
is better...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
@@ -98,6 +102,7 @@ const SegmentedControl = (props: SegmentedControlProps) => { | |||
outlineColor = activeColor, | |||
outlineWidth = BORDER_WIDTH, | |||
throttleTime = 0, | |||
segmentsStyle: segmentsStyleProp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the rename here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another segmentsStyle
in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok...
* Add segmentStyle prop to SegmentedControl * renaming * renaming #2
Description
SegmentedControl - add segmentStyle prop (and update example)
#2495
Changelog
SegmentedControl - add segmentStyle prop